import { convexHull } from "./convexHull"
import { download } from "./download"
import { singleInstance } from "./singleInstance"
import { bezier3 } from "./bezier"
import { lerp, lerp2, lerp3 } from "./math"
import { randomColor, randomRange, randomRangeInt } from "./random"
import { loadTexture, loadEnvironmentTexture } from "./texture"
import { format } from "./time"
import { fitCameraToObject3D, fitObject3DToCamera } from "./others";

import { distanceSquared2, distanceSquared3, distance2, distance3, getPolygonArea, isLineCross, checkLinesCross, isInView, vec2ToNum, vec3ToNum, vec3ToVec2NumberArray, vec3ToVec2, getLengthFromVertices } from "./topology"

export const Utils = {
    getLengthFromVertices,
    isInView,
    singleInstance,
    download,
    loadTexture,
    loadEnvironmentTexture,
    format,
    fitCameraToObject3D,
    fitObject3DToCamera
}

export const MathUtils = {
    distanceSquared2,
    distanceSquared3,
    distance2,
    distance3,
    vec2ToNum,
    vec3ToNum,
    vec3ToVec2NumberArray,
    vec3ToVec2,
    randomColor,
    randomRange,
    randomRangeInt,
    lerp,
    lerp2,
    lerp3,
    bezier3,
}

export const TopoUtils = {
    getPolygonArea,
    isLineCross,
    checkLinesCross,
    convexHull
}